package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.OrderAddMapper;
import com.gxa.saas.pojo.GoodsDetailed;
import com.gxa.saas.pojo.GoodsXq;
import com.gxa.saas.pojo.Storage;
import com.gxa.saas.service.OrderAddService;
import com.gxa.saas.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderAddServiceImpl implements OrderAddService {
    @Autowired
    OrderAddMapper orderAddMapper;


    @Override
    public Integer insert(GoodsXq goodsXq) {
        return orderAddMapper.insert(goodsXq);
    }

    @Override
    public Integer delete(Integer id) {
        return null;
    }

    @Override
    public List<Storage> selectByName(String name, Integer page, Integer size) {
        return orderAddMapper.selectByName(name,(page-1)*size,size);
    }

    @Override
    public List<Storage> selectByList(Integer page, Integer size) {
        return orderAddMapper.selectByList((page-1)*size,size);
    }

    @Override
    public List<GoodsXq> selectByGoodsXq(Integer page, Integer size) {
        return orderAddMapper.selectByGoodsXq((page-1)*size,size);
    }

    @Override
    public Storage selectById(Integer id) {
        return orderAddMapper.selectById(id);
    }


}
